package com.tang.model.adpater.power.intefaceAdapter;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/8/25 20:37
 * @Desc
 * @Remarks
 */
public class PowerAdapter implements DC {
    private AC220V ac220V;

    public PowerAdapter(AC220V ac220V) {
        this.ac220V = ac220V;
    }

    @Override
    public int outputDC5V() {
        int ac = ac220V.outputAC220V();
        int dc= ac / 44;
        System.out.println("经过适配器的转换，已经将：" + ac + "V,转换为：" + dc + "V");
        return dc;
    }

    @Override
    public int outputDC12V() {
        return 0;
    }

    @Override
    public int outputDC18V() {
        return 0;
    }

    @Override
    public int outputDC24V() {
        return 0;
    }
}
